<%@ page language="java" pageEncoding="UTF-8" %>
<%@ taglib uri="/struts-tags" prefix="s" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <%@include file="../../common/Include_input_head.jsp" %>

    <title>维护角色</title>
</head>

<body>

<div id="scrollContent">
    <s:form name="theform" method="post" theme="simple">
        <s:hidden name="tsysRole.roleid" id="roleid"/>
        <s:hidden id="menues" name="menues"/>
        <s:hidden id="menuebuttons" name="menuebuttons"/>
        <s:hidden id="type" name="type" value="%{type}"/>
        <div class="box1" panelWidth="100%">
            <table class="tableStyle" transMode="true" footer="normal">
                <tr>
                    <td width="10%" align="right">角色名称：</td>
                    <td width="20%" align="left" nowrap="nowrap"><s:textfield id="rolename" name="tsysRole.rolename"
                                                                              maxlength="15"
                                                                              cssClass="validate[required,length[1,15]]"/>
                        <label style="color:red">*</label></td>
                    <td width="13%" align="right">状态：</td>
                    <td width="20%" align="left"><s:select name="tsysRole.state" list="#{'1':'启用','0':'禁用'}"
                                                           listKey="key"
                                                           listValue="value"/><label style="color:red">*</label></td>
                    <td width="37%">&nbsp;</td>
                </tr>
                <tr>
                    <td align="right" nowrap="nowrap">描述：</td>
                    <td colspan="4" align="left">
		      	<span class="float_left">
					<s:textarea name="tsysRole.memo" id="memo" cssStyle="width:400px;"
                                cssClass="validate[length[0,50]]"></s:textarea>
				</span>
                        <span class="img_light" style="height:80px;" title="限制在50字以内" id="light_id"></span></td>
                </tr>
                <tr>
                    <td align="left" width="100%" nowrap="nowrap" colspan="5">
                        <div class="box1" panelWidth="600" align="left">
                            <div class="simpleTab" iframeMode="true">

                                <div class="simpleTab_con">
                                    <s:if test="#type == 'user'">
                                        <IFRAME scrolling="no" width="100%" frameBorder=0 id=frmrightChild
                                                name=frmrightChild onload="iframeHeight('frmrightChild')"
                                                src="${basePath}/id/idUser-list.action?type=role"
                                                allowTransparency="true"></IFRAME>
                                    </s:if>
                                    <s:else>
                                        <IFRAME scrolling="no" width="100%" frameBorder=0 id=frmrightChild
                                                name=frmrightChild onload="iframeHeight('frmrightChild')"
                                                src="${basePath}/id/idMenuButton-list.action?upmenuid=<s:property value='defaultMenuid'/>"
                                                allowTransparency="true"></IFRAME>
                                    </s:else>
                                </div>
                            </div>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
    </s:form>
</div>
<s:if test="#type == 'menu'">
    <div class="padding_top10">
        <table class="tableStyle" transMode="true">
            <tr>
                <td colspan="4">
                    <input type="button" id="ysSaveButton" value=" 保 存 " onclick="doSave()"/>
                    <input type="button" value=" 关 闭 " onclick="parent.closeEntityWindow()"/>
                    <s:if test="actionErrors.size()>0 || actionMessages.size()>0 || fieldErrors.size()>0">
                            <span id="SystemErrorMessage" style="top: 20px">
                                <s:actionerror cssStyle="color:red"/>
                                <s:actionmessage cssStyle="color:blue"/>
                                <s:fielderror/>
                            </span>
                    </s:if>
                </td>
            </tr>
        </table>
    </div>
</s:if>
</div>
</body>
</html>
